package ch.mse.android.starbucksfinder.ui;

import ch.mse.android.starbucksfinder.StarbucksLocation;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.OverlayItem;

public class StarbucksOverlayItem extends OverlayItem {
	private static final String ITEM_TITLE = "Starbucks store";
	private StarbucksLocation location;


	public StarbucksOverlayItem(StarbucksLocation location){
		super(createGeoPoint(location), ITEM_TITLE , location.toMultilineString());
		this.location = location;
	}

	private static GeoPoint createGeoPoint(StarbucksLocation location) {
		int lat = (int) (location.getLatitude() * 1000000);
    	int lng = (int) (location.getLongitude() * 1000000);
    	return new GeoPoint(lat, lng);
	}
	
	public StarbucksLocation getLocation() {
		return location;
	}
}
